Hi Tom,
I just spend a couple hours at this and it looks like most my problem is likely related to kflop somehow. Seems like my orientation is comming up short or overshooting based on the S value in Kmotioncnc. I set a persist.userdata variable to override the current spindle speed and then set a specific speed in my orientation program. This is working fine. I've checked DAC Voltage in kmotion while orientating and even triple checked with voltmeter wired to vfd signal, its always at a constant voltage while orientating, regardless of S value.
But for some reason it always comes up short when im using a low S value and overshoots when i use a high S value. Most times it falls in the notch and is ok, but i did some testing tonight away from the notch and it always comes up shorter with a low S value.
I've tripple checked the signal voltage to drive, cant see an issue with this. I even tried programming DAC higher temporarily prior to orientation to see if it was somehow remembering the previous setting, but this is not the case. Its always related to current S value.
So the only other thing is timing. Is there any chance Kflop is slower to turn off my spindle while S is set higher? I know this makes no sense but i cant think of anything else. This has me baffled. Here is my orientation code:
if (ReadBit(157)) // If in low gear
{
persist.UserData[155] = 1; // Enable orientate speed override
Delay_sec(0.05); // Delay 0.05s
DAC(3,-80); // set motor rpm
SetBit(154); // spindle on
while (!ReadBit(1045)) WaitNextTimeSlice(); // wait for orientation signal
Zero(4); // Zero Spindle Axis
while (chan[4].Position < 4000) WaitNextTimeSlice(); // Wait until half way around to turn on air cylinder
SetBit(63); // turn on orientation air cylinder
while (chan[4].Position < 6500) WaitNextTimeSlice(); // Wait until almost around
ClearBit(154); // turn spindle off
}
Any Ideas? The occasional failed orientation is driving me crazy! Thanks again!
Mark